function creatematrix(A,index)
delete(['../testmatrices/testmatrix' num2str(index) '.*'])

fileID = fopen(['../testmatrices/testmatrix' num2str(index) '.in'],'a');
fprintf(fileID,'%1i \n',size(A,1));
for i=1:size(A,2)
fprintf(fileID,'%20.15e ',A(i,:));
fprintf(fileID,'\n');
end
% out
fileID = fopen(['../testmatrices/testmatrix' num2str(index) '.out'],'a');
B = expm(A);
fprintf(fileID,'%1i \n',size(A,1));
for i=1:size(A,2)
fprintf(fileID,'%20.15e ',B(i,:));
fprintf(fileID,'\n');
end